home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 76 / XENIATGM66.iso / Indiana Jones / Indiana Jones.exe / RESOURCE / PREVIEW.GOB / cog_item_padlockkey.cog < prev    next >
Text File  |  1999-11-15  |  1KB  |  75 lines

  1. # Jones 3D Cog Script
  2. #
  3. # item_PadlockKey.cog
  4. #
  5. # [RT]
  6. #
  7. # (C) 1998 LucasArts Entertainment Company LLC. All Rights Reserved
  8. #
  9. # ===================================================================
  10.  
  11. symbols
  12.  
  13. message    activated
  14. message    touched
  15. message    taken
  16.  
  17. thing    player    local
  18.  
  19. int        bin=61    local
  20.  
  21. end
  22.  
  23. # ===================================================================
  24.  
  25. code
  26.  
  27. activated:
  28.  
  29.     StartCutscene(0);
  30.  
  31.     if (Rand() < 0.5)
  32.     {
  33.         SetExtCamOffset('0.15 -0.05 0.04');
  34.     }
  35.     else
  36.     {
  37.         SetExtCamOffset('-0.15 -0.05 0.04');
  38.     }
  39.     SetExtCamLookOffset('0.0 0.02 -0.01');
  40.  
  41.     return;
  42.  
  43. # -------------------------------------------------------------------
  44.  
  45. touched:
  46.  
  47.     player = GetSourceRef();
  48.  
  49.     if (GetInv(player, bin) < GetInvMax(player, bin))
  50.     {
  51.         TakeItem(GetSenderRef(), player);
  52.     }
  53.     else
  54.     {
  55.         EndCutscene();
  56.     }
  57.     
  58.     return;
  59.  
  60. # -------------------------------------------------------------------
  61.  
  62. taken:
  63.  
  64.     player = GetSourceRef();
  65.  
  66.     ChangeInv(player, bin, 1.0);
  67.     SetInvAvailable(player, bin, 1);
  68.     JonesInvItemChanged(bin);
  69.  
  70.     EndCutscene();
  71.  
  72.     return;
  73.  
  74. end
  75.